#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <cstdio>
#include <string>
#include <stack>
#include <set>
#define IOS ios::sync_with_stdio(false), cin.tie(0)
using namespace std;
typedef long long ll;
struct node
{
    ll num;
    ll x,y;
}pre[1000100];
ll a[1100];
ll n,cnt;

bool cmp(node p,node q){
    return p.num<q.num;
}
bool judge(ll i,ll j,ll mid){
    ll num=pre[mid].num;
    while(mid>=0&&pre[mid].num==num){
        mid--;
    }
    mid++;
    while(mid<cnt&&pre[mid].num==num){
        // cout<<i<<" "<<j<<" "<<pre[mid].x<<" "<<pre[mid].y<<endl;

        if(pre[mid].x!=i&&pre[mid].x!=j&&pre[mid].y!=i&&pre[mid].y!=j)return true;
        
        
        mid++;
    }
    // if(pre[mid].x==i||pre[mid].x==j||pre[mid].y==i||pre[mid].y==j||pre[mid].num+sum!=0)return false;
    return false;
}
int main()
{
    IOS;
    cin>>n;
    for(ll i=0;i<n;i++){
        cin>>a[i];
    }
    cnt=0;
    for(ll i=0;i<n;i++){
        for(ll j=i+1;j<n;j++){
            pre[cnt].x=i;
            pre[cnt].y=j;
            pre[cnt++].num=a[i]+a[j];  
        }
    }
    sort(pre,pre+cnt,cmp);
    bool flag=false;
    for(ll i=0;i<n;i++){         
        for(ll j=i+1;j<n;j++){
            ll l=0,r=cnt-1,sum=a[i]+a[j];
            ll mid;
            while(l<=r){
                mid=(l+r)>>1;
                if(pre[mid].num+sum==0){
                    if(judge(i,j,mid)){
                        flag=true;
                        // cout<<i<<" "<<j<<" "<<pre[mid].x<<" "<<pre[mid].y<<endl;
                    }
                    break;
                }
                if(pre[mid].num+sum<0){
                    l=mid+1;
                }
                else r=mid-1;
            }
            if(flag){
                break;
            }
        }
        if(flag)break;
    }
    if(flag)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;

    getchar();
    getchar();
    return 0;
}
